<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <button>按钮</button>
    <input type="text" name="" id="" value="输入内容">
    <script>
        var btn = document.querySelector('button')
        var input = document.querySelector('input')
        btn.onclick = function() {
            input.value = '被点击了'
                //如果想要某个表单只能点击一次被禁用我们用disabled'
            this.disabled = true
                //this 去往函数的调用者
        }
    </script>
</body>

</html>